package com.jwsoft.manager.business.integration.demo.impl;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.convert.Convert;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.jwsoft.manager.business.integration.demo.DemoBatchIntegration;
import com.jwsoft.manager.business.integration.demo.DemoIntegration;
import com.jwsoft.manager.common.enums.demo.DemoDictEnum;
import com.jwsoft.manager.common.vo.demo.DemoTestDetailVO;
import com.jwsoft.manager.common.vo.demo.DemoTestVO;
import com.jwsoft.manager.dao.model.DemoTest;
import com.jwsoft.manager.dao.service.DemoTestService;
import com.xiaoyy.core.common.enums.BoolEnum;
import com.xiaoyy.core.common.enums.FuncTypeEnum;
import com.xiaoyy.core.common.exception.AppException;
import com.xiaoyy.core.config.annotations.ApiService;
import com.xiaoyy.core.config.annotations.OpApi;
import com.xiaoyy.core.config.annotations.SaveOplog;
import com.xiaoyy.core.config.store.SessionHelper;
import com.xiaoyy.core.config.util.PagerUtil;
import com.xiaoyy.core.dict.utils.DictUtil;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;

import java.util.Arrays;
import java.util.List;

/**
 * 例子接口管理
 * **/

@Service
@ApiService(funcCode = "DEMO", title = "接口例子")
public class DemoBatchIntegrationImpl implements DemoBatchIntegration {
    @Autowired
    DemoIntegration demoIntegration;
    @Autowired
    DictUtil dictUtil;

    @Override
    @OpApi(funcCode = "DEMO0007",title = "批量保存支持单个回退例子",funcType = FuncTypeEnum.insert)
    @SaveOplog(operationType = "DEMO0007",operationName = "批量保存支持单个回退例子",dataType = "batch")
    public void saveBatch(List<DemoTestVO> voList) {
        for(DemoTestVO demoTestVO:voList){
            demoIntegration.save(demoTestVO);
        }

    }
}
